<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="author" content="wangyuguo">
		<title>系统参数配置</title>
		<script type="text/javascript" src="../script/common.js"></script>
		<script type="text/javascript">
			//页面控件初始化
			function load() {
				Eui.showNavigation();//导航
				DWR.call("partyService.findSysProperties", function(result) {
					for (var i = 0; i < result.length; i++) {
						var p = result[i];
						var obj = $(p.name);
						if (!obj) continue;
						var value;
						if (typeof obj.viewRender == "function"){
							value = obj.viewRender(p.value);
						}else
							value = p.value
						if (obj)
							obj.value = value;
					}
				})
			}
			function saveProperty(prop) {
				var value = null;
				var dom;
				if (typeof prop == "object") {
					dom = prop;
					value = dom.value;
					prop = dom.id;
				} else{
					dom = $(prop);
					value = dom.value;
					isCheckForm = false;
					if (dom.onblur && !dom.onblur())
						return;
				}
				
				if (!checkForm(paramForm)) return;
				
				DWR.call("partyService.setSystemProperty", prop, value, function() {
					showInformation("系统参数保存成功!");
					if (dom && typeof dom.viewRender == "function"){
						value = dom.viewRender(value);
					}
					dom.value = value
				})
			}
			function saveProperties(prop) {
				if (prop == "password.strong") {
					var rs = document.getElementsByName(prop);
					for (var i = 0; i < rs.length; i++) {
						var r = rs[i];
						if (r.checked)
							prop = r;
					}
				}
				saveProperty(prop);
			}
		</script>
	</head>
	
	<body onload="load()">
		<div class="nav">
			<div id="nav">&nbsp;</div>
		</div>
		<div id="content">
			<div class="paramview" id="paramview">
				<div class="form">
					<div class="formTitle">系统参数配置</div>
		<form id="paramForm" name="paramForm">
					<table cellSpacing="0" cellPadding="4" width="100%" border="0" class="col3">
						<tr>
							<td width="30%"><label>列表分页显示行数</label></td>
							<td width="35%"><input type="text" name="magicTableLength" id="magicTableLength" maxlength="3" onblur="return checkV(this,'positiveInt',true)"> 行/页</td>
							<td width="35%"><button type="button" onclick="saveProperties('magicTableLength')">保 存</button></td>
						</tr>
					
					</table>
					</form>
				</div>
			</div>
		</div>
	</body>
</html>